package cn.kgc.service.system;

import cn.kgc.GetIPUtil;
import cn.kgc.dao.system.smj_logDao;
import cn.kgc.pojo.Log;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.concurrent.ExecutionException;

@Service
public class smj_logServiceImpl implements smj_logService{

    @Resource
    public  smj_logDao sm;

    @Override
    public Page<Log> selAllLog(String time,String event) {
        return sm.selAllLog(time,event);
    }

    /**
     * 记录日志
     *
     */
    @Override
    public int insertLog(Integer u_id, String event){
        String ips = GetIPUtil.getIps();
        return sm.insertLog(u_id,event+ips);
    }
}
